<div class="widget">

<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar') ) : ?>

	<h3>Recent Posts</h3>
	<ul>
	<?php $rposts = get_posts('numberposts=5'); foreach($rposts as $post) : ?>
	<li><a href="<?php the_permalink(); ?>"><?php the_title();?></a></li>
	<?php endforeach; ?>
	</ul>

	<h3>Categories</h3>
	<ul><?php wp_list_categories('title_li='); ?></ul>

	<h3>Authors</h3>
	<ul><?php wp_list_authors('orderby=post_count&order=DESC&optioncount=1&exclude_admin=0&show_fullname=1&feed=RSS&feed_type=rss2'); ?></ul>

	<h3>Archives</h3>
	<ul><?php wp_get_archives(); ?></ul>

	<h3>Meta</h3>
	<ul>
		<?php if (is_user_logged_in()) wp_register(); ?>
		<li><?php wp_loginout(); ?></li>
		<li><a href="<?php bloginfo('rss2_url'); ?>" title="Syndicate this site using RSS">Entries RSS</a></li>
		<li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="The latest comments to all posts in RSS">Comments RSS</a></li>
		<li><a href="http://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress.org</a></li>
		<?php wp_meta(); ?>
	</ul>

<?php endif; ?>

</div>